<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>淘宝图片切换</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            border: 0;
            list-style: none;
        }

        .all {
            margin: 100px auto;
            width: 360px;
            height: 71px;
            border: 1px solid #ccc;
            padding-top: 360px;
            background: url("images/taobao/01big.jpg") no-repeat;
        }

        .all ul {
            border-top: 1px solid #ccc;
        }

        .all li {
            float: left;
        }

    </style>
</head>
<body>
<div class="all" id="bg">
    <ul>
        <li id="li01"><img src="images/taobao/01.jpg" alt="" width="70" height="70"></li>
        <li id="li02"><img src="images/taobao/02.jpg" alt="" width="70" height="70"></li>
        <li id="li03"><img src="images/taobao/03.jpg" alt="" width="70" height="70"></li>
        <li id="li04"><img src="images/taobao/04.jpg" alt="" width="70" height="70"></li>
        <li id="li05"><img src="images/taobao/05.jpg" alt="" width="70" height="70"></li>
    </ul>
</div>
<script>
    function change(li_id,bg_pic) {
        var obg = document.getElementById("bg");
        var oli = document.getElementById(li_id);
        oli.onmouseover =function(){
            obg.style.background = "url(images/taobao/"+bg_pic+"big.jpg) no-repeat";
        }
    }
    change("li01","01");
    change("li02","02");
    change("li03","03");
    change("li04","04");
    change("li05","05");
</script>
</body>
</html>